﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="JquerySample._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Simple Ajax Request</title>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function()
        {
            $("#SimpleAjaxRequestButton").click(function()
            {
                $.ajax({
                    type: "GET",
                    url: "AjaxResponse.txt",
                    success: function(html)
                    {
                        $("#SimpleAjaxResponse").html(html);
                    }

                });
                return false;
            });
        });
    </script>

</head>
<body>
    <form id="SimpleAjaxRequestForm" runat="server">
    <div>
        <asp:Button ID="SimpleAjaxRequestButton" runat="server" Text="Request" />
        <div id="SimpleAjaxResponse" runat="server">
        </div>
    </div>
    </form>
</body>
</html>
